Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Nov 6, 2025

This PR adds a comprehensive JSON schema for XcodeGen YAML files and updates all XcodeGen YAML files in the repository to reference it.

Changes

  • Added schema/xcodegen.schema.json - A complete JSON schema based on the XcodeGen ProjectSpec documentation
  • Updated all 15 XcodeGen YAML files to reference the schema via # yaml-language-server: $schema=../../schema/xcodegen.schema.json

Benefits

  • Enables autocomplete and IntelliSense in YAML language servers (VS Code, Cursor, etc.)
  • Provides validation to catch errors before running xcodegen
  • Improves developer experience when editing XcodeGen YAML files
  • Schema includes validation for all XcodeGen features: targets, schemes, dependencies, settings, packages, etc.

The schema is based on the official XcodeGen ProjectSpec documentation and includes proper validation rules, including preventing invalid properties like configs at the target level (should use settings.configs instead).

Closes #6695

#skip-changelog

@philprime philprime changed the title Add XcodeGen JSON schema for YAML language server chore(dx): Add XcodeGen JSON schema for YAML language server Nov 6, 2025
@codecov
Copy link

codecov bot commented Nov 6, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
52 1 51 1
View the top 1 failed test(s) by shortest run time
iOS_Swift_UITests.LaunchUITests::testBreadcrumbData
Stack Traces | 0s run time
.../iOS-Swift/iOS-Swift-UITests/LaunchUITests.swift:6 - Failed to tap "Extra" Button: Timed out while evaluating UI query.

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@philprime philprime force-pushed the add-xcodegen-schema branch from 095f7a8 to 2cd5a6b Compare November 6, 2025 12:01
- Add comprehensive JSON schema for XcodeGen YAML files
- Update all XcodeGen YAML files to reference the schema
- Schema includes validation for targets, schemes, dependencies, settings, and all XcodeGen features
- Enables autocomplete and validation in YAML language servers
@philprime philprime force-pushed the add-xcodegen-schema branch from 2cd5a6b to 790ecd7 Compare November 6, 2025 12:01
@philprime philprime enabled auto-merge (squash) November 6, 2025 12:02
@philprime philprime disabled auto-merge November 6, 2025 12:02
@philprime philprime enabled auto-merge (squash) November 6, 2025 12:02
@philprime
Copy link
Member Author

@cursor @sentry review

@cursor
Copy link

cursor bot commented Nov 6, 2025

Review Summary

I've completed a thorough review of this PR. Here's my assessment:

XcodeGen Schema Implementation - Excellent

The core changes for this PR are well-executed:

  1. Comprehensive Schema: The schema/xcodegen.schema.json file is thorough and includes:

    • All major XcodeGen features (targets, schemes, dependencies, settings, packages, etc.)
    • Proper validation rules and constraints
    • Good use of JSON Schema draft-07 features
    • Appropriate enum values for target types, platforms, and other options
    • Proper additionalProperties: false on Target definition to prevent invalid properties
  2. Complete YAML Updates: All 13 XcodeGen YAML files in the Samples/ directory have been correctly updated with the schema reference:

    • # yaml-language-server: $schema=../../schema/xcodegen.schema.json
    • Relative paths are correct from each location
    • Non-XcodeGen YAML files (feature-flags.yml, .swiftlint.yml) were appropriately left unchanged
  3. Developer Experience: This will provide significant value through:

    • Autocomplete in editors with YAML language server support
    • Real-time validation before running xcodegen
    • Documentation via hover/IntelliSense

Cursor Bot Bug Report is Incorrect

The cursor bot flagged a non-existent issue about SentryCrashWrapper.swift having hardcoded debugger detection. I verified that:

  • SentryCrashWrapper.swift has NO changes in this PR
  • Line 87 correctly calls sentrycrashdebug_isBeingTraced()
  • No debugger detection functionality is broken

⚠️ Branch Contains Unrelated Changes

Your branch includes commits from PR #6646 (removing inAppExcludes functionality), which affects many files beyond the XcodeGen schema. These changes are already merged to main, so they'll be excluded when this PR is merged.

Recommendation: APPROVE

This PR successfully delivers on its stated goal of adding XcodeGen schema support. The implementation is clean, comprehensive, and will improve the developer experience for maintaining XcodeGen configuration files.


Open in Cursor Open in Web

Learn more about Cursor Agents

@cursor
Copy link

cursor bot commented Nov 6, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM with one question

@philprime philprime self-assigned this Nov 6, 2025
@philprime philprime merged commit e8e40fd into main Nov 7, 2025
152 of 156 checks passed
@philprime philprime deleted the add-xcodegen-schema branch November 7, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add XcodeGen JSON schema for YAML language server

4 participants